package node

import (
	"gitee/yinlai/kms-backend/controllers/node"
	"github.com/gin-gonic/gin"
)

//// 实现添加集群
//func create(nodeGroup *gin.RouterGroup) {
//	nodeGroup.POST("/create", node.Create)
//}

// 更新集群
func update(nodeGroup *gin.RouterGroup) {
	nodeGroup.POST("/update", node.Update)
}

//// 删除
//func delete(nodeGroup *gin.RouterGroup) {
//	nodeGroup.POST("/delete", node.Delete)
//}
//
//// 删除列表
//func deleteList(nodeGroup *gin.RouterGroup) {
//	nodeGroup.POST("/deleteList", node.DeleteList)
//}

// 获取
func get(nodeGroup *gin.RouterGroup) {
	nodeGroup.GET("/get", node.Get)
}

// 获取集群列表
func list(nodeGroup *gin.RouterGroup) {
	nodeGroup.GET("/list", node.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	nodeGroup := g.Group("/node")
	update(nodeGroup)
	get(nodeGroup)
	list(nodeGroup)
}
